#include "qtgraphics.h"

#include "DefaultCategoryDataset.h"

qtgraphics::qtgraphics(QWidget *parent)
    : QWidget(parent)
{
	ui.setupUi(this);

	LineChart* lineChart = ui.graphic;
	lineChart->setTitle("Fitness x Generation");
	lineChart->setHorizontalTitle("Generation");
	lineChart->setVerticalTitle("Fitness");

	DefaultCategoryDataset* dcd = new DefaultCategoryDataset();

	dcd->addValue(0.1, 0, "s1");
	dcd->addValue(0.6, 15, "s1");
	dcd->addValue(0.6, 20, "s1");

	dcd->addValue(0.3, 5, "s2");
	dcd->addValue(0.4, 4, "s2");

	lineChart->setDataset(dcd);
}

qtgraphics::~qtgraphics()
{

}
